//! Theme.debug.js
//

(function() {

Type.registerNamespace('ThemeChain');

////////////////////////////////////////////////////////////////////////////////
// Theme

Theme = function Theme() {
    /// <field name="_themeInitialized$2" type="Boolean" static="true">
    /// </field>
    Theme.initializeBase(this);
}
Theme.ThemeOnce = function Theme$ThemeOnce() {
    /// <summary>
    /// Dynamic overrides performed once upon loading
    /// </summary>
    /// <returns type="Boolean"></returns>
    Theme.ThemeOnce = function(){};
    Helpers.staticInheritClass((Theme).get_name(), (ThemeYoshi).get_name());
    window.setTimeout(function() {
        Inform.log('Theme.ThemeOnce()');
        Theme.Update();
        $(document).bind('F2Event', FunctionKeys.F2);
        Master.MasterPage();
    }, 1);
    return !Theme._themeInitialized$2;
}
Theme.Update = function Theme$Update() {
    /// <summary>
    /// Reenterant dynamic overrides performed in Master.cs for every new page load
    /// </summary>
    ThemeBase.appUri = (window.location.href.indexOf('nsb') >= 0) ? ThemeBase.appUri + 'NSB' : ThemeBase.appUri;
    ThemeYoshi.pagesDataPath = Uri.join(ThemeBase.appUri, ThemeYoshi.pagesPartition);
    ThemeYoshi.bgImgUrl = Uri.versionize('url(' + Uri.join(ThemeYoshi.pagesDataPath, ThemeYoshi.currentPageName, 'background.jpg') + ')');
}


Theme.registerClass('Theme', ThemeYoshi);
Theme._themeInitialized$2 = Theme.ThemeOnce();
})();

//! This script was generated using Script# v0.7.4.0
